//召唤兽加点  {"魔力":0,"耐力":0,"敏捷":0,"力量":0,"体质":0,"序列":3}
// @ts-ignore
export async function execute(client_id,message_json) {
    let login_characters = G.Characters.get_current_login_characters(client_id);
    let index = message_json["序列"]-1;
    let pet_data = login_characters["召唤兽"][index];
    if(pet_data === undefined){
        ClientUtils.send_basic_prompt(client_id, "召唤兽不存在");
        return;
    }
    let sum = message_json["魔力"] + message_json["耐力"] +message_json["敏捷"] +message_json["力量"] +message_json["体质"];
    if(sum ===0 ){
        ClientUtils.send_basic_prompt(client_id, "未分配任何属性点");
        return;
    }
    if(sum > pet_data["潜力"]){
        ClientUtils.send_basic_prompt(client_id, "可分配属性点不足");
        return;
    }
    pet_data["潜力"]-=sum;
    pet_data["力量"]+=message_json["力量"];
    pet_data["魔力"]+=message_json["魔力"];
    pet_data["耐力"]+=message_json["耐力"];
    pet_data["体质"]+=message_json["体质"];
    pet_data["敏捷"]+=message_json["敏捷"];
    G.Pet.computing_pet_data(pet_data);
    ClientUtils.send_client_message(client_id, 16, login_characters["召唤兽"]);
}